﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PO_Change_Button
{
    public partial class Custom_Button: PictureBox
    {
        public Custom_Button()
        {
            InitializeComponent();
        }

        private Image beforeImage;
        private Image afterImage;


        public Image ImageNormal
        {
            get{ return beforeImage; }
            set{ beforeImage = value; }
        }

        public Image ImageChange
        {
            get { return afterImage; }
            set { afterImage = value; }
        }

        public void Custom_Button_MouseDown(object sender, MouseEventArgs e)
        {
            if(e.Button == MouseButtons.Left)
            {
                this.Width -= 5;
                this.Height -= 5;
            }
        }

        public void Custom_Button_MouseUp(object sender, MouseEventArgs e)
        {
            this.Width += 5;
            this.Height += 5;
        }
    }
 }
